using System;
using System.Collections;
using System.Text;
using IBatisNet.DataMapper; 
using NUnit.Framework; 
namespace testibatis1
{
    [TestFixture] 
    public class TestEarnings
    {
        [Test]
        public void TestSelectByID()
        {
            IList earnings = Mapper.Instance().QueryForList("SelectEarning",null);
            IList payroll = Mapper.Instance().QueryForList("SelectPayroll", null);
            int payrolls = payroll.Count; 

            Earnings oo = (Earnings)Mapper.Instance().QueryForObject("SelectEarning", 7);
            Console.Write((" the object id: " + oo.Id));  
            Assert.IsTrue(earnings.Count > 0, "earnings is not empty");
            foreach (object o in earnings)
            {
                Console.Write(("  ," + ((Earnings)o).Id));
            }
        }

    }
    public class Payroll
    {
        private int _id;
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

    }

    public class Earnings
    {
        private int _id;
    
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
    }
}
